<?php
/**
 * +--------------------------------------------------------+
 * @Created by Phpstorm.
 * @Category 2020_06_19_144125_create_exception_errors_table.php
 * @Depiction
 * @Author hwy <429208948@qq.com>
 * @Date 2022/3/22  17:01
 * +--------------------------------------------------------+
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateExceptionErrorsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('exception_errors', function (Blueprint $table) {
            $table->uuid('id')->unique();
            $table->text('message')->nullable()->comment('错误信息');
            $table->string('code');
            $table->text('file')->comment('文件位置');
            $table->bigInteger('line')->comment('行数');
            $table->text('trace')->comment('错误详情');
            $table->text('trace_as_string');
            $table->tinyInteger('is_solve')->default(0)->comment('是否解决 0未解决 1已解决');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('exception_errors');
    }
}
